package com.zr.datamodel;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 线路实体类
 * @author qichun
 *
 */
@Entity
@Table(name="ld_route")
public class RouteDM {
	private int id;
	//线路名称
	private String name;
	//起点名称
	private String startPoint;
	//终点名称
	private String endPoint;
	private List<OrderDM> orders=new ArrayList<>();
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@Column(name="name")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name="start_point")
	public String getStartPoint() {
		return startPoint;
	}
	public void setStartPoint(String startPoint) {
		this.startPoint = startPoint;
	}
	@Column(name="end_point")
	public String getEndPoint() {
		return endPoint;
	}
	public void setEndPoint(String endPoint) {
		this.endPoint = endPoint;
	}
	@OneToMany(mappedBy="route")
	public List<OrderDM> getOrders() {
		return orders;
	}
	public void setOrders(List<OrderDM> orders) {
		this.orders = orders;
	}
	
}
